<template>
  <div class="box pa-20">
    <ul class="share-list">
      <li class="share-item pa-20" v-for="(item,index) in shareList" :key="index">
        <router-link to="">
            <div class="left-box" >
              <p class="share-title">{{item.title}}</p>
              <p class="share-time">分享时间：{{item.time|format}}</p>
            </div>
            <van-icon name="arrow" color="#999" size="20"/>
        </router-link>
      </li>
    </ul>
    
  </div>
</template>

<script>
export default {
    name:'MyShare',
    filters:{
      format(value){
        if(!value) return''
        let index=value.indexOf(' ')
        return value.substr(0,index)+'\xa0\xa0'+value.substr(index)
      }
    },
    data(){
        return{
          shareList:[
            {title:'少林寺成人票',time:'2019-12-17  15:11:21'},
            {title:'少林寺成人票',time:'2019-12-17  15:11:21'}
          ]
        }
    }
}
</script>

<style lang="scss" scoped>
@import "@/assets/css/public";
.box{
  background-color: $gray_bg;
}
.share-item{
    height: vw(160);
    margin-bottom:vw(20);
    border-radius: vw(10);
    background-color: #fff;
    font-size: vw(32);
    >a{
       display: flex;
      justify-content: space-between;
      align-items: center;
      .left-box{
        flex:1;
        .share-title{
          font-size: vw(36);
          line-height: vw(72);
        }
        .share-time{
          font-size: vw(28);
          color:#999;
        }
      }
    }
    
}
</style>